package me.listcircular;

import java.util.Iterator;

public class Test4 {
    public static void main(String[] args) {
        DoublyLinkedListCircular dlc = new DoublyLinkedListCircular();

        dlc.addFirst(4);
        dlc.addFirst(3);
        dlc.addFirst(2);
        dlc.addFirst(1);

        dlc.addLast(7);

        dlc.removeFirst();
        dlc.removeByValue(4);

        System.out.print(dlc);
        System.out.println();
        System.out.println("--------------------");
        Iterator<Integer> it = dlc.iterator();
        while (it.hasNext()) {
            System.out.print(it.next() + " ");
        }

    }
}
